Matthias Clasen [Sun, 4 Apr 2021 01:59:47 +0000 (21:59 -0400)]
textbtree: Speed up _gtk_text_line_char_index
No need to allocate a stack piecemeal here.
Matthias Clasen [Sun, 4 Apr 2021 00:25:35 +0000 (20:25 -0400)]
textbtree: Avoid malloc in one place
Matthias Clasen [Sun, 4 Apr 2021 02:02:45 +0000 (22:02 -0400)]
textlayout: Don't call render_para too much
render_para produces no nodes for an empty paragraph.
Don't call it over and over for those.
Matthias Clasen [Sun, 4 Apr 2021 02:02:04 +0000 (22:02 -0400)]
textlayout: Remove some unnecessary code
The same field is set again 2 lines down.
Chao-Hsiung Liao [Sat, 3 Apr 2021 23:53:57 +0000 (23:53 +0000)]
Update Chinese (Taiwan) translation
(cherry picked from commit
3d3912d7f4ea27ddb9aa79f02bce6bc2d4889bb0)
Matthias Clasen [Sat, 3 Apr 2021 20:14:29 +0000 (20:14 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gsk: Rename resource paths
See merge request GNOME/gtk!3399
Matthias Clasen [Sat, 3 Apr 2021 20:14:13 +0000 (20:14 +0000)]
Merge branch 'dotted-lines3' into 'master'
Modernize error underlines
See merge request GNOME/gtk!3398
Matthias Clasen [Wed, 31 Mar 2021 03:59:38 +0000 (23:59 -0400)]
Modernize error underlines
Implement PANGO_UNDERLINE_ERROR as a dotted line, instead of
squiggly, which looks quite dated.
Matthias Clasen [Sat, 3 Apr 2021 12:16:50 +0000 (08:16 -0400)]
gsk: Move shader resources
Move the resources of each renderer to its subdirectory.
We've previously done that for the ngl renderer, but it
is better to be consistent and do it for all the renderers.
Matthias Clasen [Sat, 3 Apr 2021 12:10:58 +0000 (08:10 -0400)]
gsk: Rename resource paths
Make the shaders of the gl renderer live under
/org/gtk/libgsk/gl. This is purely cosmetic.
Matthias Clasen [Sat, 3 Apr 2021 03:20:17 +0000 (03:20 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
node test: Improve --generate
See merge request GNOME/gtk!3397
Matthias Clasen [Sat, 3 Apr 2021 03:04:09 +0000 (23:04 -0400)]
settings: Make font-size changes apply immediately
We need to invalidate the style when font-size changes,
because we propagate this value through the initial
value of the CSS font-size property, and it will not
be recomputed otherwise.
Matthias Clasen [Sat, 3 Apr 2021 02:24:19 +0000 (22:24 -0400)]
immulticontext: Unset client widget on delegate change
Forgetting to do so was causing the Wayland im context
to leave behind a dead event controller. This was showing
up as a crash when closing the inspector after changing
the im-module property of a GtkText widget. The crash
was delayed until closing the inspector because the
inspector keeps a ref on the event controllers of the
currently shown widget.
Matthias Clasen [Sat, 3 Apr 2021 02:24:00 +0000 (22:24 -0400)]
imwayland: Name event controllers
This helps with debugging.
Matthias Clasen [Sat, 3 Apr 2021 02:23:34 +0000 (22:23 -0400)]
widget-factory: Name an event controller
This helps with debugging.
Matthias Clasen [Sat, 3 Apr 2021 02:23:03 +0000 (22:23 -0400)]
text: Name all event controllers
This helps with debugging.
Matthias Clasen [Sat, 3 Apr 2021 01:38:14 +0000 (21:38 -0400)]
inspector: Support copying nodes to clipboard
Add a button that copies the serialization of the
selected node to the clipboard.
Matthias Clasen [Sat, 3 Apr 2021 01:24:59 +0000 (21:24 -0400)]
node-editor: Support pasting the image
Add a button that copies the image to the clipboard.
Matthias Clasen [Sat, 3 Apr 2021 00:36:58 +0000 (20:36 -0400)]
nodeparser: Change the serialization
Arrange things so that non-child parameters
are always printed before the children. This
greatly helps with readability, which really
suffers when there's hundreds of lines of indented
children between the node start and its parameters.
Update all affected tests.
Matthias Clasen [Sat, 3 Apr 2021 00:35:39 +0000 (20:35 -0400)]
node test: Improve --generate
This is a pet peeve of mine: When we call
g_test_init() before handling --generate,
the random seed spew pollutes the output.
Highly annoying. I've fixes many test binaries
over the years, but more keep popping up.
Matthias Clasen [Sat, 3 Apr 2021 00:18:48 +0000 (00:18 +0000)]
Merge branch 'fix-downscaled-textures' into 'master'
ngl: Fix downscaled textures
See merge request GNOME/gtk!3395
Matthias Clasen [Sat, 3 Apr 2021 00:04:36 +0000 (00:04 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
comboboxtext: Remove misleading docs
Closes #3824
See merge request GNOME/gtk!3396
Matthias Clasen [Fri, 2 Apr 2021 23:45:59 +0000 (23:45 +0000)]
Merge branch 'fix-initial-font-selection' into 'master'
fontchooser: Fix initial font selection
Closes #3687
See merge request GNOME/gtk!3392
Matthias Clasen [Fri, 2 Apr 2021 23:44:30 +0000 (19:44 -0400)]
comboboxtext: Remove misleading docs
The entry is no longer accessible.
The docs were outdated.
Fixes: #3824
Matthias Clasen [Fri, 2 Apr 2021 23:33:44 +0000 (19:33 -0400)]
ngl: Avoid huge intermediate textures
Instead of rendering the unclipped child to a texture
(and risking blowing the texture size limit, and bad
downscaling), just render the clipped region, and live
with the fact that we can't cache the rendered texture.
This avoid bad artifacts when scrolling long textviews
in rounded clips.
Matthias Clasen [Fri, 2 Apr 2021 22:41:53 +0000 (18:41 -0400)]
ngl: Plug a memory leak
This was introduced in
f9457af128012fd3935a69fdcefb.
Matthias Clasen [Fri, 2 Apr 2021 22:33:01 +0000 (18:33 -0400)]
ngl: Fix downscaled textures
It is not pretty, but at least it works now.
Matthias Clasen [Fri, 2 Apr 2021 18:50:16 +0000 (18:50 +0000)]
Merge branch 'flat-button-activating' into 'master'
button: Style .keyboard-activating on frameless buttons
See merge request GNOME/gtk!3394
Chris Mayo [Fri, 2 Apr 2021 18:24:51 +0000 (19:24 +0100)]
button: Style .keyboard-activating on frameless buttons
The use of the keyboard-activating CSS class for buttons was added
in [1], but the style did not apply to buttons with has-frame=FALSE.
[1]
00923615f4 ("button: Add back visual feedback for keynav", 2021-04-01)
Nathan Follens [Fri, 2 Apr 2021 18:09:01 +0000 (18:09 +0000)]
Update Dutch translation
(cherry picked from commit
a356bf6fac604e37cfd4ac6e9c2486a3453ac181)
Matthias Clasen [Tue, 2 Mar 2021 22:55:30 +0000 (17:55 -0500)]
fontchooser: Fix initial font selection
The change in
740559a54f to populate the list incrementally
broke initial font selection. Fix that, by trying to select
until the incremental filling is done.
Fixes: #3687
Matthias Clasen [Fri, 2 Apr 2021 03:02:49 +0000 (03:02 +0000)]
Merge branch 'theme-reorg' into 'master'
Reorganize our themes
See merge request GNOME/gtk!3079
Matthias Clasen [Fri, 2 Apr 2021 02:02:38 +0000 (22:02 -0400)]
Make theme fallback working with the new names
Since we are likely going to see theme names like
Adwaita and HighContrast, make fallback work as follows:
Adwaita -> Default
Adwaita:dark -> Default:dark
HighContrast -> Default:hc
HighContrast:dark -> Default:hc-dark
HighContrastInverse -> Default:hc-dark
Other themes will fall back to Default, as before.
Matthias Clasen [Fri, 2 Apr 2021 00:38:55 +0000 (00:38 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
testsuite: Sort gsk compare tests
See merge request GNOME/gtk!3389
Matthias Clasen [Thu, 1 Apr 2021 21:03:54 +0000 (17:03 -0400)]
testsuite: Sort gsk compare tests
Easier to find things that way.
Matthias Clasen [Thu, 1 Apr 2021 21:00:31 +0000 (17:00 -0400)]
Add some more gsk tests
The css-background test contains a node pattern that
is optimized in the ngl renderer.
Matthias Clasen [Thu, 1 Apr 2021 20:32:30 +0000 (16:32 -0400)]
Add one more compose test
Matthias Clasen [Thu, 1 Apr 2021 23:36:32 +0000 (23:36 +0000)]
Merge branch 'button-activate-feedback' into 'master'
button: Add back visual feedback for keynav
Closes #3813
See merge request GNOME/gtk!3390
Matthias Clasen [Thu, 1 Apr 2021 22:36:23 +0000 (18:36 -0400)]
button: Add back visual feedback for keynav
We lost the visual feedback for activating a button
via Space or Enter when the :active pseudo-state became
managed. Bring it back with a style class.
Fixes: #3813
Matthias Clasen [Thu, 1 Apr 2021 20:50:04 +0000 (20:50 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add one more compose test
See merge request GNOME/gtk!3388
Matthias Clasen [Thu, 1 Apr 2021 20:32:30 +0000 (16:32 -0400)]
Add one more compose test
Matthias Clasen [Thu, 1 Apr 2021 20:01:06 +0000 (20:01 +0000)]
Merge branch 'us-intl-compose' into 'master'
Revert Compose sequence changes
Closes #3807
See merge request GNOME/gtk!3386
Matthias Clasen [Thu, 1 Apr 2021 19:18:20 +0000 (15:18 -0400)]
Add more compose tests
Test the sequences whose demise made people
unhappy.
Matthias Clasen [Thu, 1 Apr 2021 19:15:47 +0000 (15:15 -0400)]
Revert Compose sequence changes
This was breaking muscle memory of people with
the us intl keyboard layout, for important keys
such as '. The unfortunate side-effect is that
our handling of <dead_acute> is a bit hampered
by sequences that don't fit the pattern. But
such is life.
Fixes: #3807
Emmanuele Bassi [Thu, 1 Apr 2021 18:49:38 +0000 (18:49 +0000)]
Merge branch 'builder-tag' into 'master'
docs: Escape tags in GtkBuilder description
See merge request GNOME/gtk!3385
Chris Mayo [Thu, 1 Apr 2021 18:21:57 +0000 (19:21 +0100)]
docs: Escape tags in GtkBuilder description
Fixes the tags and the rest of the gi-docgen created HTML page not being
visible in a browser.
Matthias Clasen [Fri, 15 Jan 2021 05:52:40 +0000 (00:52 -0500)]
Drop Adwaita and HighContrast themes
These themes will reappear in libadwaita in due course.
Matthias Clasen [Fri, 15 Jan 2021 06:07:47 +0000 (01:07 -0500)]
widget-factory: Use the new themes
Update the Style menu to switch between the variants
of the Default theme.
Matthias Clasen [Fri, 15 Jan 2021 05:57:15 +0000 (00:57 -0500)]
Change the default theme to "Default"
We are not shipping Adwaita anymore.
Matthias Clasen [Fri, 15 Jan 2021 06:07:08 +0000 (01:07 -0500)]
Make the theme variants available as themes
This makes it easier to implement the theme switching
in widget-factory, since we don't have a variant setting.
Matthias Clasen [Fri, 15 Jan 2021 05:25:30 +0000 (00:25 -0500)]
Reorganize our themes
Rename the included theme to Default, with 4 variants:
light, dark, hc, hc-dark. This replaces Adwaita,
Adwaita:dark, HighContrast and HighContrastInverse.
We still make the themes available under these names,
and we still set up Adwaita-dark and HighContrastInverse
as the dark variants of Adwaita and HighContrast.
The unification of the theme variants under Default
is not quite perfect; it would be nice to merge
the assets/ and assets-hc/ subdirectories and render
all assets from a single svg file.
Benjamin Otte [Thu, 1 Apr 2021 15:10:50 +0000 (15:10 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
snapshot: scale border widths when appending border nodes
Closes #3819
See merge request GNOME/gtk!3384
Benjamin Otte [Thu, 1 Apr 2021 14:37:47 +0000 (16:37 +0200)]
snapshot: Move sanity checks to a better place
Fixes cases where the sanity checks would reject valid code, like when
using GL shaders on a scaled transform.
Fixes #3819
Benjamin Otte [Thu, 1 Apr 2021 14:20:32 +0000 (16:20 +0200)]
snapshot: scale border widths when appending border nodes
Found by Matthias on IRC while arguing about GtkSnapshot being too
complicated.
Matthias Clasen [Thu, 1 Apr 2021 14:25:08 +0000 (14:25 +0000)]
Merge branch 'filechooser-signal-disconnect' into 'master'
filechooserwidget: Disconnect settings signal on dispose
See merge request GNOME/gtk!3383
Carlos Garnacho [Thu, 1 Apr 2021 12:11:15 +0000 (12:11 +0000)]
Merge branch 'wip/exalm/overshoot-changes' into 'master'
scrolledwindow: Cancel overshoot on dimension changes
Closes #3752
See merge request GNOME/gtk!3300
Alexander Mikhaylenko [Mon, 15 Mar 2021 12:17:01 +0000 (17:17 +0500)]
scrolledwindow: Cancel overshoot on dimension changes
If we scroll down in a list that's still being filled, we hit the edge and
initiate overshoot, and then the adjustment's upper value increases. This
leads to an unwanted bounce back.
Additionally, if in a similar situation the upper value decreases, the
overscroll glow gets stuck.
Update kinetic scrolling upper and lower value on changes, and immediately
cancel it if dimensions on that side change.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3752
Rafał Dzięgiel [Thu, 1 Apr 2021 07:36:19 +0000 (09:36 +0200)]
filechooserwidget: Reduce code duplication for disconnecting settings signal
Instead of getting current display before calling settings signal removal,
do it inside remove function and only if there is a signal connection to remove.
Rafał Dzięgiel [Thu, 1 Apr 2021 07:27:06 +0000 (09:27 +0200)]
filechooserwidget: Disconnect settings signal on dispose
Settings signal was not being disconnected on dispose causing
application crash when user changed icon theme after dialog disposal.
Matthias Clasen [Wed, 31 Mar 2021 21:42:59 +0000 (21:42 +0000)]
Merge branch 'ebassi/broadway-docs' into 'master'
docs: Update the Broadway instructions
See merge request GNOME/gtk!3380
Matthias Clasen [Wed, 31 Mar 2021 21:42:49 +0000 (21:42 +0000)]
Merge branch 'ebassi/docs-links' into 'master'
docs: Update the links to the docs of GTK dependencies
Closes #3817
See merge request GNOME/gtk!3381
Matthias Clasen [Wed, 31 Mar 2021 21:27:18 +0000 (21:27 +0000)]
Merge branch 'offscreen-fixes' into 'master'
Offscreen fixes
See merge request GNOME/gtk!3379
Matthias Clasen [Wed, 31 Mar 2021 11:49:58 +0000 (07:49 -0400)]
gsk: Add another test
Compare clipped repeat nodes. Must skip cairo here
since it blurred the child by scaling after rendering.
Also skip the gl renderer, since it hasn't been fixed
for this yet. ngl passes this test.
Emmanuele Bassi [Wed, 31 Mar 2021 19:51:27 +0000 (20:51 +0100)]
docs: Update the links to the docs of GTK dependencies
Use docs.gtk.org where appropriate.
Fixes: #3817
Emmanuele Bassi [Wed, 31 Mar 2021 19:06:54 +0000 (20:06 +0100)]
docs: Update the Broadway instructions
The Broadway server binary is now versioned, and it's not compatible
with the GTK3 server.
Matthias Clasen [Wed, 31 Mar 2021 11:49:14 +0000 (07:49 -0400)]
testsuite: Rename next to ngl
Use specific names for renderers in the gsk tests.
Otherwise the tests may use the wrong renderer, or
the same renderer twice.
Matthias Clasen [Wed, 31 Mar 2021 18:36:24 +0000 (14:36 -0400)]
ngl: Fix offscreen rendering with transforms
There was confusion here about the handling of the
modelview transform. The modelview transform we are
getting is already set up for rendering the node
we are given, so keep it - except for possible adding
an extra scale on top when the texture would otherwise
be too big.
Matthias Clasen [Wed, 31 Mar 2021 18:34:16 +0000 (14:34 -0400)]
ngl: Be explicit about offscreen clipping
Explicitly set all the input arguments.
This makes it clearer what is going on.
Matthias Clasen [Wed, 31 Mar 2021 18:32:47 +0000 (14:32 -0400)]
ngl: Add sonme comments
The GskNglRenderOffscreen struct is a mix of in and
out arguments. Better annotate that a little bit.
Matthias Clasen [Wed, 31 Mar 2021 11:34:56 +0000 (11:34 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Update the gi-docgen repository
See merge request GNOME/gtk!3352
Benjamin Otte [Tue, 30 Mar 2021 21:54:57 +0000 (21:54 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
gstmedia: Properly detect stream metadata when preparing
See merge request GNOME/gtk!3377
Emmanuele Bassi [Tue, 30 Mar 2021 20:44:51 +0000 (20:44 +0000)]
Merge branch 'ebassi/docs-ci' into 'master'
ci: Add missing graphviz dependency
See merge request GNOME/gtk!3376
Benjamin Otte [Tue, 30 Mar 2021 20:23:32 +0000 (22:23 +0200)]
gstmedia: Properly detect stream metadata when preparing
We can look at the GstPlayerMediaInfo to get all the info we care about.
Emmanuele Bassi [Tue, 30 Mar 2021 20:08:43 +0000 (21:08 +0100)]
ci: Add missing graphviz dependency
We generate the hierarchy graph for GTK types, and in order to do so, we
need the dot utility from graphviz in the CI image.
Anders Jonsson [Tue, 30 Mar 2021 17:13:11 +0000 (17:13 +0000)]
Update Swedish translation
Matthias Clasen [Tue, 30 Mar 2021 16:09:34 +0000 (16:09 +0000)]
Merge branch 'docs' into 'master'
docs: Cover corner-case of @line_number = total lines in buffer
See merge request GNOME/gtk!3373
Matthias Clasen [Tue, 30 Mar 2021 11:19:15 +0000 (07:19 -0400)]
4.2.0
Matthias Clasen [Tue, 30 Mar 2021 12:48:29 +0000 (08:48 -0400)]
Actually build docs for releases
Matthias Clasen [Tue, 30 Mar 2021 12:19:10 +0000 (08:19 -0400)]
Disable the border-image-url reftest
It seems to make assumptions about text positioning that
are not holding with subpixel positioning. I'm not 100%
sure how that leads to exactly the artifacts that are seen
here, but I am just disabling the test until that is fully
understood.
Matthias Clasen [Tue, 30 Mar 2021 12:01:55 +0000 (08:01 -0400)]
Disable flaky focus tests
Matthias Clasen [Tue, 30 Mar 2021 11:42:18 +0000 (07:42 -0400)]
Disable the label-background reftest
It makes assumptions about text positioning that are
not holding with subpixel positioning. There is no
guarantee that the next word in a multi-word text
starts on an even pixel boundary, as it does when
you break the text into multiple, separately rendered
blocks.
Matthias Clasen [Tue, 30 Mar 2021 11:32:59 +0000 (07:32 -0400)]
Fix tests for new version
Matthias Clasen [Tue, 30 Mar 2021 14:58:53 +0000 (14:58 +0000)]
Merge branch 'ebassi/dist-docs' into 'master'
build: Dist the API references
See merge request GNOME/gtk!3375
Emmanuele Bassi [Tue, 30 Mar 2021 14:42:40 +0000 (15:42 +0100)]
build: Dist the API references
Copy them into the dist root from the build root, so that they will be
available in the release archive.
Jonas Ådahl [Tue, 30 Mar 2021 14:06:33 +0000 (14:06 +0000)]
Merge branch 'issue3791-gtk4' into 'master'
gdk/wayland: Defer processing of globals closures
Closes #3791
See merge request GNOME/gtk!3374
Robert Mader [Sat, 27 Mar 2021 14:48:00 +0000 (15:48 +0100)]
gdk/wayland: Defer processing of globals closures
... until all globals have been received.
The dependency tracking introduced in
4e9be39518 only allows to
specify required globals and processes the closures as soon as
the requirements have been met. There are, however, also optional
dependencies - most notably the primary_selection protocol.
Currently we rely on the fact that compositors like Mutter announce
it before `wl_seat`, even though the order is not specified in
the spec.
Process globals closures only after all globals have been announced,
so optional dependencies can be accommodated.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/3791
Avinash Sonawane [Tue, 30 Mar 2021 11:17:33 +0000 (16:47 +0530)]
docs: Cover corner-case of @line_number = total lines in buffer
Matthias Clasen [Tue, 30 Mar 2021 11:15:13 +0000 (11:15 +0000)]
Merge branch 'ngl-text-tweaks' into 'master'
Ngl text tweaks
See merge request GNOME/gtk!3367
Matthias Clasen [Mon, 29 Mar 2021 00:53:46 +0000 (20:53 -0400)]
ngl: Avoid a goto
Reshuffle the code slightly, so we can use a continue
instead.
Matthias Clasen [Mon, 29 Mar 2021 00:22:24 +0000 (20:22 -0400)]
gsk: Avoid empty glyphs early
Strip out PANGO_GLYPH_EMPTY when text nodes are
constructed. Then we don't have to check this special
case in the inner loop in visit_text_node.
Matthias Clasen [Mon, 29 Mar 2021 00:20:50 +0000 (20:20 -0400)]
ngl: Speed up glyph loop
Move some work out of the loop in visit_text_node.
This takes advantage of the fact that the yoffset
of most glyphs is zero, so yphase generally does
not change in a line of text.
Matthias Clasen [Mon, 29 Mar 2021 01:13:23 +0000 (21:13 -0400)]
ngl: We only need two bits for phases
We use 4 phases, so 2 bits are enough.
Matthias Clasen [Tue, 30 Mar 2021 03:34:36 +0000 (23:34 -0400)]
Updates
Matthias Clasen [Tue, 30 Mar 2021 04:16:00 +0000 (04:16 +0000)]
Merge branch 'ngl-trivia' into 'master'
Ngl trivia
See merge request GNOME/gtk!3372
Matthias Clasen [Tue, 30 Mar 2021 03:54:13 +0000 (03:54 +0000)]
Merge branch 'video-player-images' into 'master'
gtk-demo: Allow opening images in video player
See merge request GNOME/gtk!3371
Matthias Clasen [Tue, 30 Mar 2021 03:39:25 +0000 (23:39 -0400)]
gtk-demo: Allow opening images in video player
It works, so why not.
Matthias Clasen [Sun, 28 Mar 2021 20:41:59 +0000 (16:41 -0400)]
ngl: Cosmetics
Remove a local variable in gsk_render_job_visit_text_node.
Matthias Clasen [Sun, 28 Mar 2021 20:41:25 +0000 (16:41 -0400)]
ngl: Improve packing
Pack texture cache entries slightly better.
There was a 4 byte hole here.
Matthias Clasen [Sun, 28 Mar 2021 17:27:28 +0000 (13:27 -0400)]
gsk: Typo fix
Matthias Clasen [Sun, 28 Mar 2021 17:27:09 +0000 (13:27 -0400)]
ngl: Typo fix